package com.zsj.methordArea;

import java.util.concurrent.TimeUnit;

/**
 * @author zsj
 * @version 1.0
 * @date 2024/6/21 14:39
 * @description
 * 设置堆的大小并不会影响方法区的大小
 * 证明方法区是独立于堆之外的
 */
public class MethodAreaMemory {
    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        try {
            TimeUnit.SECONDS.sleep(1000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        long end = System.currentTimeMillis();
        System.out.println("消耗时间" + (end - start) + "毫秒");
    }
}
